﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HttpRequester;
using Common.Constants;
using BotvaBot.BusinessLayer.RequestChainItems.Factory;

namespace BotvaBot.RequestChainItems
{
    [ChainItem]
    public class GotoBadalkaChainItem : BotvaLogedInChainItemBase
    {
        protected override bool IsContextValidInternal()
        {
            return base.IsContextValidInternal();
        }

        protected override void PrepareRequestInternal()
        {
            Url = "http://g3.botva.ru/dozor.php";
            Method = HttpMethod.GET;
        }

        public override bool IsResponseValidInternal()
        {
            //string content = Requester.PageContent;
            //content = content.Replace(" ", string.Empty)
            //                .Replace("'", "\"")
            //                .ToUpper();

            //string searchedStr = "<input type='submit' class='cmd_all cmd_medium_sl cmd_amedium_sl ' value='ВХОД' >";
            //searchedStr = searchedStr.Replace(" ", string.Empty)
            //                .Replace("'", "\"")
            //                .ToUpper();

            //return content.Contains(searchedStr);

            return true;
        }
    }
}
